home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_mysql.idb / usr / freeware / include / mysql / errmsg.h.z / errmsg.h
C/C++ Source or Header  |  2002-10-07  |  2KB  |  60 lines

  1. /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
  2.    
  3.    This library is free software; you can redistribute it and/or
  4.    modify it under the terms of the GNU Library General Public
  5.    License as published by the Free Software Foundation; either
  6.    version 2 of the License, or (at your option) any later version.
  7.    
  8.    This library is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.    Library General Public License for more details.
  12.    
  13.    You should have received a copy of the GNU Library General Public
  14.    License along with this library; if not, write to the Free
  15.    Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  16.    MA 02111-1307, USA */
  17.  
  18. /* Error messages for mysql clients */
  19. /* error messages for the demon is in share/language/errmsg.sys */
  20.  
  21. #ifdef    __cplusplus
  22. extern "C" {
  23. #endif
  24. void    init_client_errs(void);
  25. extern const char *client_errors[];    /* Error messages */
  26. #ifdef    __cplusplus
  27. }
  28. #endif
  29.  
  30. #define CR_MIN_ERROR        2000    /* For easier client code */
  31. #define CR_MAX_ERROR        2999
  32. #if defined(OS2) && defined( MYSQL_SERVER)
  33. #define CER(X) client_errors[(X)-CR_MIN_ERROR]
  34. #else
  35. #define ER(X) client_errors[(X)-CR_MIN_ERROR]
  36. #endif
  37. #define CLIENT_ERRMAP        2    /* Errormap used by my_error() */
  38.  
  39. #define CR_UNKNOWN_ERROR    2000
  40. #define CR_SOCKET_CREATE_ERROR    2001
  41. #define CR_CONNECTION_ERROR    2002
  42. #define CR_CONN_HOST_ERROR    2003
  43. #define CR_IPSOCK_ERROR        2004
  44. #define CR_UNKNOWN_HOST        2005
  45. #define CR_SERVER_GONE_ERROR    2006
  46. #define CR_VERSION_ERROR    2007
  47. #define CR_OUT_OF_MEMORY    2008
  48. #define CR_WRONG_HOST_INFO    2009
  49. #define CR_LOCALHOST_CONNECTION 2010
  50. #define CR_TCP_CONNECTION    2011
  51. #define CR_SERVER_HANDSHAKE_ERR 2012
  52. #define CR_SERVER_LOST        2013
  53. #define CR_COMMANDS_OUT_OF_SYNC 2014
  54. #define CR_NAMEDPIPE_CONNECTION 2015
  55. #define CR_NAMEDPIPEWAIT_ERROR 2016
  56. #define CR_NAMEDPIPEOPEN_ERROR 2017
  57. #define CR_NAMEDPIPESETSTATE_ERROR 2018
  58. #define CR_CANT_READ_CHARSET    2019
  59. #define CR_NET_PACKET_TOO_LARGE 2020
  60.